package me.zhenqu.model.bo.impl;

import me.zhenqu.model.bo.TimeLineBo;
import me.zhenqu.model.dao.TimeLineDao;
import me.zhenqu.model.pojo.entity.TimeLine;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: yibing.tan
 * Date: 11-11-10
 * Time: 下午4:58
 * To change this template use File | Settings | File Templates.
 */
@Service("timeLineBo")
public class TimeLineBoImpl implements TimeLineBo {
     @Autowired
     TimeLineDao timeLineDao;

    public void setTimeLineDao(TimeLineDao timeLineDao) {
        this.timeLineDao = timeLineDao;
    }

    @Override
    public List<TimeLine> loadTimeLines(Long uid, long since) {
        return timeLineDao.loadTimeLines(uid ,since);
    }

    @Override
    public void save(TimeLine timeLine) {
        timeLineDao.save(timeLine);
    }

    @Override
    public void update(TimeLine timeLine) {
        timeLineDao.update(timeLine);
    }

    @Override
    public void delete(TimeLine timeLine) {
        timeLineDao.delete(timeLine);
    }

    @Override
    public TimeLine findByID(Long user_id) {
        return timeLineDao.findByID(user_id);
    }
}
